package com.tz.online.user.service.impl;

import com.tz.online.entity.User;
import com.tz.online.user.dao.IUserDao;
import com.tz.online.user.service.IUserService;
import com.tz.online.util.BeanFactory;

public class UserServiceImpl implements IUserService {
	IUserDao ud = (IUserDao) BeanFactory.getBean("userDao");

	@Override
	public User loginUser(String name) {

		return ud.selectUserByName(name);
	}

	@Override
	public void registerUser(User user) {
		ud.insertUser(user);
	}

}
